﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ObviousCode.Aspect.PluginLibrary.Interfaces;
using ObviousCode.Common.Utils.Library.Set;
using ObviousCode.Common.Utils.Library.Dictionaries;
using ObviousCode.Aspect.PluginLibrary.Caches;
using ObviousCode.UI.Aspect.Events;

namespace ObviousCode.UI.Aspect.Persistence.AspectMenu.Loaders
{
    public class MenuLoader_V1 : MenuLoader
    {
        protected override void PerformLoad(IAspectMenu parent, ObviousCode.Common.Utils.Library.Dictionaries.PropertyDictionary saveData)
        {
            PropertyArray objects = saveData.ArrayFor("surface-objects");

            foreach (object id in objects)
            {
                parent.LoadMenuItem(AspectCache.Main.GetSurfaceObject(id.ToString()));
            }
        }

        public override int Version
        {
            get { return 1; }
        }

        public override int LoadSteps
        {
            get { throw new NotImplementedException(); }
        }
    }
}
